<?php
echo View::template(null);
class ContactosController extends AppController {
  
public function form(){
 
}
public function formresponse(){
    if(Input::hasPost('code')){
        //Flash::success('aqui');
        /* verificamos si se mando form y si dentro del $_POST esta un campo llamado code
        */
        // instanciamos secureimage y validamos si el code enviado es valido 
        $img = Load::lib('securimage');        
        
        $valid = $img->check('4');
	if($valid == true)
          Flash::success('Captcha valido');
        else
          Flash::error("Captcha invalido!");
        Router::route_to('action: index');
   }
}
 
 
public function captcha(){
        Flash::success('aqui');
	$img = Load::lib('securimage'); 
	$img->wordlist_file =  CORE_PATH . 'vendors/secureimage/words/words.txt' ;		
	$img->signature_font = CORE_PATH . 'vendors/secureimage/AHGBold.ttf' ;
	$img->ttf_file = CORE_PATH . 'vendors/secureimage/AHGBold.ttf' ;
	$img->audio_path = CORE_PATH . 'vendors/secureimage/AHGBold.ttf';
 
	$img->show(''); 
	//$this->render (NULL, NULL);
        //View::select(Null);
	}
 
}
